import { http } from '@/utils/http'
export interface IFooItem {
  id: string
  name: string
}
export interface AppUserLoginResult {
  tokenValue: string
}

export const smsLoginSendCodeApi = (phoneNo: string) => {
  return http.post('-mock/api/v1/auth/sms-login/send-code', {
    phoneNo,
  })
}

export const smsLoginApi = (phoneNo: string, code: string) => {
  return http.post<AppUserLoginResult>('-mock/api/v1/auth/sms-login/login', {
    phoneNo,
    code,
  })
}

export const passwordLogin = (phoneNo: string, password: string) => {
  return http.post<AppUserLoginResult>('-mock/api/v1/auth/password-login/login', {
    phoneNo,
    password,
  })
}

export const logoutApi = () => {
  return http.post('-mock/api/v1/auth/logout')
}
